<?php 
class JD_Loader extends CI_Loader {
	/**
	 * Constructor
	 *
	 * Sets the path to the view files and gets the initial output buffering level
	 *
	 * @access	public
	 */
	function __construct()
	{
		parent::__construct();
	}
	
	function view($view, $vars = array(), $return = FALSE,$path="")
	{
		if ( JD_ENABLE_PLUGIN === TRUE && $path !== ''){
			return $this->_ci_load(array(
				'_ci_view' => $view,
				'_ci_path'=>PLUGIN_PATH."{$path}/views/{$view}".EXT, 
				'_ci_vars' => $this->_ci_object_to_array($vars), 
				'_ci_return' => $return)
			);
		}
		return parent::view($view,$vars,$return);
	}
}